<?php
/**
 * PublicValidate.php
 * @author zohnの梦
 * @email  1171672036@qq.com
 * @date   2021/1/8
 */

namespace app\api\validate;


use app\common\service\ImageCaptchaService;
use think\Validate;

class PublicValidate extends Validate
{

    protected $rule = [
        'username' => ['require', 'min:4'],
        'password' => ['require', 'min:6', 'max:32']
    ];

    protected $message = [
        'username.require' => '用户名不能为空',
        'username.min'     => '用户名不能小于4位',
        'password.require' => '密码不能为空',
        'password.min'     => '密码不能小于6位',
        'password.max'     => '密码不能大于32位'
    ];

    protected $scene = [
        'login' => ['username', 'password'],
        'check' => ['id', 'code'],
    ];

}